<template>
  <div>
    <!--
    1. 局部组件
    2. 全局组件
    3. 插件式组件 : 全局的模态框 操作dom  install
       Vue.use(Router)  router-view

    -->
    <GridView :columns="columns" :tableData="tableData"/>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        columns: [
          {
            prop: 'date',
            title: '日期',
            width: '180'
          },
          {
            prop: 'name',
            title: '姓名',
            width: '180'
          },
          {
            prop: 'address',
            title: '地址',
            width: '180'
          }
        ]
      }
    },
    computed: {
      tableData() {
        let arr = [];
        for (let i = 0; i < 100; i++) {
          arr.push({date: `${new Date().getMinutes()}:${new Date().getSeconds()}`, name: '张' + i, address: '北京' + i})
        }
        return arr
      }
    },
    name: "MyGridView"
  }
</script>

<style scoped>

</style>
